import 'package:flutter/material.dart';

import '../../../bean/home_bean.dart';
import '../../../common/system_config.dart';

class ColumnItemWidget extends StatelessWidget {
  List<Widget> lw  = [];

  ColumnItemWidget(List<AlarmInfo> data) {
    for(int i = 0; i < data.length; i++){
      lw.add(Padding(
        padding: EdgeInsets.symmetric(vertical: 5,horizontal: 0),
        child: Container(
          child: Text(
            '${data[i].alarmTypeName.split("-")[1]}：${data[i].amount}',
              style: TextStyle(
                color: data[i].amount>0 ? Colors.red : null,
                fontSize: SystemConfig.fs_content3
              ),
          ),
        ),
      ));
    }
  }

  @override
  Widget build(BuildContext context) {
    return Expanded(
      child: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: lw,
      )
    );
  }
}